﻿using System;
using System.ComponentModel;
using System.Runtime.InteropServices;

namespace Teigha.Core
{
	public class OdGsBaseModel : OdGsModel
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public OdGsBaseModel(IntPtr cPtr, bool cMemoryOwn) : base(GlobalsPINVOKE.OdGsBaseModel_SWIGUpcast(cPtr), cMemoryOwn)
		{
			this.swigCPtr = new HandleRef(this, cPtr);
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		public static HandleRef getCPtr(OdGsBaseModel obj)
		{
			if (obj != null)
			{
				return obj.swigCPtr;
			}
			return new HandleRef(null, IntPtr.Zero);
		}

		public override void Dispose()
		{
			if (this.swigCPtr.Handle != IntPtr.Zero)
			{
				if (this.swigCMemOwn)
				{
					lock (this.locker)
					{
						if (this.swigCPtr.Handle != IntPtr.Zero && this.swigCMemOwn)
						{
							this.swigCMemOwn = false;
							GlobalsPINVOKE.deletePD_OdGsBaseModel(this.swigCPtr);
						}
					}
					this.swigCMemOwn = false;
				}
				this.swigCPtr = new HandleRef(null, IntPtr.Zero);
			}
			GC.SuppressFinalize(this);
			base.Dispose();
		}

		public ViewRefArray GetMViews()
		{
			ViewRefArray result = new ViewRefArray(GlobalsPINVOKE.OdGsBaseModel_GetMViews(this.swigCPtr), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void SetMViews(ViewRefArray arr)
		{
			GlobalsPINVOKE.OdGsBaseModel_SetMViews(this.swigCPtr, ViewRefArray.getCPtr(arr));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public ModuleRefArray GetMModules()
		{
			ModuleRefArray result = new ModuleRefArray(GlobalsPINVOKE.OdGsBaseModel_GetMModules(this.swigCPtr), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void SetMModules(ModuleRefArray arr)
		{
			GlobalsPINVOKE.OdGsBaseModel_SetMModules(this.swigCPtr, ModuleRefArray.getCPtr(arr));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual void invalidateEntRect(OdGiDrawable pDrawable, OdGiDrawable pParent, bool bForceIfNoExtents)
		{
			GlobalsPINVOKE.OdGsBaseModel_invalidateEntRect__SWIG_0(this.swigCPtr, OdGiDrawable.getCPtr(pDrawable), OdGiDrawable.getCPtr(pParent), bForceIfNoExtents);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual void invalidateEntRect(OdGiDrawable pDrawable, OdGiDrawable pParent)
		{
			GlobalsPINVOKE.OdGsBaseModel_invalidateEntRect__SWIG_1(this.swigCPtr, OdGiDrawable.getCPtr(pDrawable), OdGiDrawable.getCPtr(pParent));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual void invalidateEntRect(OdGsEntityNode pNode, OdGsContainerNode pParent, bool bForceIfNoExtents)
		{
			GlobalsPINVOKE.OdGsBaseModel_invalidateEntRect__SWIG_2(this.swigCPtr, OdGsEntityNode.getCPtr(pNode), OdGsContainerNode.getCPtr(pParent), bForceIfNoExtents);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public uint m_nMfCached
		{
			get
			{
				uint result = GlobalsPINVOKE.OdGsBaseModel_m_nMfCached_get(this.swigCPtr);
				if (GlobalsPINVOKE.SWIGPendingException.Pending)
				{
					throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
				}
				return result;
			}
			set
			{
				GlobalsPINVOKE.OdGsBaseModel_m_nMfCached_set(this.swigCPtr, value);
				if (GlobalsPINVOKE.SWIGPendingException.Pending)
				{
					throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
				}
			}
		}

		public uint m_nMfReused
		{
			get
			{
				uint result = GlobalsPINVOKE.OdGsBaseModel_m_nMfReused_get(this.swigCPtr);
				if (GlobalsPINVOKE.SWIGPendingException.Pending)
				{
					throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
				}
				return result;
			}
			set
			{
				GlobalsPINVOKE.OdGsBaseModel_m_nMfReused_set(this.swigCPtr, value);
				if (GlobalsPINVOKE.SWIGPendingException.Pending)
				{
					throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
				}
			}
		}

		public bool checkFaded()
		{
			bool result = GlobalsPINVOKE.OdGsBaseModel_checkFaded(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setCheckFaded(bool bOn)
		{
			GlobalsPINVOKE.OdGsBaseModel_setCheckFaded(this.swigCPtr, bOn);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public ViewPropsArray getViewProps()
		{
			ViewPropsArray result = new ViewPropsArray(GlobalsPINVOKE.OdGsBaseModel_getViewProps(this.swigCPtr), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGsViewImpl refView()
		{
			OdGsViewImpl result = (OdGsViewImpl)Teigha.Core.Helpers.odrxCreateObjectInternal(GlobalsPINVOKE.OdGsBaseModel_refView(this.swigCPtr), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGsBaseVectorizeDevice refDevice()
		{
			OdGsBaseVectorizeDevice result = (OdGsBaseVectorizeDevice)Teigha.Core.Helpers.odrxCreateObjectInternal(GlobalsPINVOKE.OdGsBaseModel_refDevice(this.swigCPtr), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public uint refModulesCount()
		{
			uint result = GlobalsPINVOKE.OdGsBaseModel_refModulesCount(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual void attachLocalViewportId(OdGsViewImpl pView, OdGsViewImpl pFrom)
		{
			GlobalsPINVOKE.OdGsBaseModel_attachLocalViewportId__SWIG_0(this.swigCPtr, OdGsViewImpl.getCPtr(pView), OdGsViewImpl.getCPtr(pFrom));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual void attachLocalViewportId(OdGsViewImpl pView)
		{
			GlobalsPINVOKE.OdGsBaseModel_attachLocalViewportId__SWIG_1(this.swigCPtr, OdGsViewImpl.getCPtr(pView));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual uint getLocalViewportId(OdGsViewImpl pView)
		{
			uint result = GlobalsPINVOKE.OdGsBaseModel_getLocalViewportId(this.swigCPtr, OdGsViewImpl.getCPtr(pView));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual uint getMaxLocalViewportId()
		{
			uint result = GlobalsPINVOKE.OdGsBaseModel_getMaxLocalViewportId(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool invalidVp(uint viewportId)
		{
			bool result = GlobalsPINVOKE.OdGsBaseModel_invalidVp(this.swigCPtr, viewportId);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void invalidateRegenDrawBlocks(OdGsViewImpl view, OdDbStub layoutId)
		{
			GlobalsPINVOKE.OdGsBaseModel_invalidateRegenDrawBlocks(this.swigCPtr, OdGsViewImpl.getCPtr(view), OdDbStub.getCPtr(layoutId));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void invalidateSectionableBlocks()
		{
			GlobalsPINVOKE.OdGsBaseModel_invalidateSectionableBlocks(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual OdGsNode gsNode(OdGiDrawable pDrawable)
		{
			OdGsNode result = (OdGsNode)Teigha.Core.Helpers.odrxCreateObjectInternal(GlobalsPINVOKE.OdGsBaseModel_gsNode(this.swigCPtr, OdGiDrawable.getCPtr(pDrawable)), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual void detach(OdGsNode pNode)
		{
			GlobalsPINVOKE.OdGsBaseModel_detach(this.swigCPtr, OdGsNode.getCPtr(pNode));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual void detachAll()
		{
			GlobalsPINVOKE.OdGsBaseModel_detachAll(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void detachAllFromDb(OdRxObject pDb)
		{
			GlobalsPINVOKE.OdGsBaseModel_detachAllFromDb(this.swigCPtr, OdRxObject.getCPtr(pDb));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGiDrawable open(OdDbStub objectId)
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr p = GlobalsPINVOKE.OdGsBaseModel_open(this.swigCPtr, OdDbStub.getCPtr(objectId));
			OdGiDrawable result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject((OdGiDrawable)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true));
				result = (OdGiDrawable)Teigha.Core.Helpers.odrxCreateObjectInternal(p, false);
			}
			else
			{
				result = (OdGiDrawable)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true);
			}
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual void onAdded(OdGiDrawable pAdded, OdGiDrawable pParent)
		{
			GlobalsPINVOKE.OdGsBaseModel_onAdded__SWIG_0(this.swigCPtr, OdGiDrawable.getCPtr(pAdded), OdGiDrawable.getCPtr(pParent));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public new virtual void onAdded(OdGiDrawable pAdded, OdDbStub parentID)
		{
			GlobalsPINVOKE.OdGsBaseModel_onAdded__SWIG_1(this.swigCPtr, OdGiDrawable.getCPtr(pAdded), OdDbStub.getCPtr(parentID));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual void onAddedImpl(OdGiDrawable pAdded, OdGiDrawable pParent)
		{
			GlobalsPINVOKE.OdGsBaseModel_onAddedImpl(this.swigCPtr, OdGiDrawable.getCPtr(pAdded), OdGiDrawable.getCPtr(pParent));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public new virtual void onModified(OdGiDrawable pModified, OdGiDrawable pParent)
		{
			GlobalsPINVOKE.OdGsBaseModel_onModified__SWIG_0(this.swigCPtr, OdGiDrawable.getCPtr(pModified), OdGiDrawable.getCPtr(pParent));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public new virtual void onModified(OdGiDrawable pModified, OdDbStub parentID)
		{
			GlobalsPINVOKE.OdGsBaseModel_onModified__SWIG_1(this.swigCPtr, OdGiDrawable.getCPtr(pModified), OdDbStub.getCPtr(parentID));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual void onModifiedImpl(OdGiDrawable pModified, OdGiDrawable pParent)
		{
			GlobalsPINVOKE.OdGsBaseModel_onModifiedImpl(this.swigCPtr, OdGiDrawable.getCPtr(pModified), OdGiDrawable.getCPtr(pParent));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public new virtual void onErased(OdGiDrawable pErased, OdGiDrawable pParent)
		{
			GlobalsPINVOKE.OdGsBaseModel_onErased__SWIG_0(this.swigCPtr, OdGiDrawable.getCPtr(pErased), OdGiDrawable.getCPtr(pParent));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public new virtual void onErased(OdGiDrawable pErased, OdDbStub parentID)
		{
			GlobalsPINVOKE.OdGsBaseModel_onErased__SWIG_1(this.swigCPtr, OdGiDrawable.getCPtr(pErased), OdDbStub.getCPtr(parentID));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual void onErasedImpl(OdGiDrawable pErased, OdGiDrawable pParent)
		{
			GlobalsPINVOKE.OdGsBaseModel_onErasedImpl(this.swigCPtr, OdGiDrawable.getCPtr(pErased), OdGiDrawable.getCPtr(pParent));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public new virtual void invalidate(OdGsModel.InvalidationHint hint)
		{
			GlobalsPINVOKE.OdGsBaseModel_invalidate__SWIG_0(this.swigCPtr, (int)hint);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public new virtual void invalidate(OdGsView pView)
		{
			GlobalsPINVOKE.OdGsBaseModel_invalidate__SWIG_1(this.swigCPtr, OdGsView.getCPtr(pView));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void invalidate(OdGsViewImpl view, uint mask)
		{
			GlobalsPINVOKE.OdGsBaseModel_invalidate__SWIG_2(this.swigCPtr, OdGsViewImpl.getCPtr(view), mask);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public uint viewChanges(uint viewportId)
		{
			uint result = GlobalsPINVOKE.OdGsBaseModel_viewChanges(this.swigCPtr, viewportId);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public uint numViewProps()
		{
			uint result = GlobalsPINVOKE.OdGsBaseModel_numViewProps(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public ViewProps viewProps(uint viewportId)
		{
			ViewProps result = new ViewProps(GlobalsPINVOKE.OdGsBaseModel_viewProps(this.swigCPtr, viewportId), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual void updateViewProps(OdGsViewImpl viewport)
		{
			GlobalsPINVOKE.OdGsBaseModel_updateViewProps(this.swigCPtr, OdGsViewImpl.getCPtr(viewport));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual bool isViewPropsValid(uint viewportId)
		{
			bool result = GlobalsPINVOKE.OdGsBaseModel_isViewPropsValid(this.swigCPtr, viewportId);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual OdGsLayerNode gsLayerNode(OdDbStub layerId, OdGsBaseVectorizer pView)
		{
			OdGsLayerNode result = (OdGsLayerNode)Teigha.Core.Helpers.odrxCreateObjectInternal(GlobalsPINVOKE.OdGsBaseModel_gsLayerNode(this.swigCPtr, OdDbStub.getCPtr(layerId), OdGsBaseVectorizer.getCPtr(pView)), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual void propagateLayerChanges(OdGsBaseVectorizeDevice device)
		{
			GlobalsPINVOKE.OdGsBaseModel_propagateLayerChanges(this.swigCPtr, OdGsBaseVectorizeDevice.getCPtr(device));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public new virtual void setTransform(OdGeMatrix3d xForm)
		{
			GlobalsPINVOKE.OdGsBaseModel_setTransform(this.swigCPtr, OdGeMatrix3d.getCPtr(xForm));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public new virtual OdGeMatrix3d transform()
		{
			OdGeMatrix3d result = new OdGeMatrix3d(GlobalsPINVOKE.OdGsBaseModel_transform(this.swigCPtr), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGsView.RenderMode renderModeOverride()
		{
			OdGsView.RenderMode result = (OdGsView.RenderMode)GlobalsPINVOKE.OdGsBaseModel_renderModeOverride(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual void setRenderModeOverride(OdGsView.RenderMode mode)
		{
			GlobalsPINVOKE.OdGsBaseModel_setRenderModeOverride__SWIG_0(this.swigCPtr, (int)mode);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public new virtual void setRenderModeOverride()
		{
			GlobalsPINVOKE.OdGsBaseModel_setRenderModeOverride__SWIG_1(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public new virtual void highlight(OdGiPathNode path, bool bDoIt, OdGsView pView)
		{
			GlobalsPINVOKE.OdGsBaseModel_highlight__SWIG_0(this.swigCPtr, OdGiPathNode.getCPtr(path), bDoIt, OdGsView.getCPtr(pView));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public new virtual void highlight(OdGiPathNode path, bool bDoIt)
		{
			GlobalsPINVOKE.OdGsBaseModel_highlight__SWIG_1(this.swigCPtr, OdGiPathNode.getCPtr(path), bDoIt);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public new virtual void highlight(OdGiPathNode path)
		{
			GlobalsPINVOKE.OdGsBaseModel_highlight__SWIG_2(this.swigCPtr, OdGiPathNode.getCPtr(path));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual void highlightImpl(OdGiPathNode path, bool bDoIt, OdGsView pView)
		{
			GlobalsPINVOKE.OdGsBaseModel_highlightImpl__SWIG_0(this.swigCPtr, OdGiPathNode.getCPtr(path), bDoIt, OdGsView.getCPtr(pView));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual void highlightImpl(OdGiPathNode path, bool bDoIt)
		{
			GlobalsPINVOKE.OdGsBaseModel_highlightImpl__SWIG_1(this.swigCPtr, OdGiPathNode.getCPtr(path), bDoIt);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual void highlightImpl(OdGiPathNode path)
		{
			GlobalsPINVOKE.OdGsBaseModel_highlightImpl__SWIG_2(this.swigCPtr, OdGiPathNode.getCPtr(path));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGsMaterialCache materialCache()
		{
			OdGsMaterialCache result = (OdGsMaterialCache)Teigha.Core.Helpers.odrxCreateObjectInternal(GlobalsPINVOKE.OdGsBaseModel_materialCache(this.swigCPtr), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual void setAdditionMode(OdGsModel.AdditionMode mode)
		{
			GlobalsPINVOKE.OdGsBaseModel_setAdditionMode(this.swigCPtr, (int)mode);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public new virtual OdGsModel.AdditionMode additionMode()
		{
			OdGsModel.AdditionMode result = (OdGsModel.AdditionMode)GlobalsPINVOKE.OdGsBaseModel_additionMode(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual void setRenderType(OdGsModel.RenderType renderType)
		{
			GlobalsPINVOKE.OdGsBaseModel_setRenderType(this.swigCPtr, (int)renderType);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public new virtual OdGsModel.RenderType renderType()
		{
			OdGsModel.RenderType result = (OdGsModel.RenderType)GlobalsPINVOKE.OdGsBaseModel_renderType(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual void setBackground(OdDbStub backgroundId)
		{
			GlobalsPINVOKE.OdGsBaseModel_setBackground(this.swigCPtr, OdDbStub.getCPtr(backgroundId));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public new virtual OdDbStub background()
		{
			IntPtr intPtr = GlobalsPINVOKE.OdGsBaseModel_background(this.swigCPtr);
			OdDbStub result = (intPtr == IntPtr.Zero) ? null : new OdDbStub(intPtr, false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual void setVisualStyle(OdDbStub visualStyleId)
		{
			GlobalsPINVOKE.OdGsBaseModel_setVisualStyle__SWIG_0(this.swigCPtr, OdDbStub.getCPtr(visualStyleId));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public new virtual OdDbStub visualStyle()
		{
			IntPtr intPtr = GlobalsPINVOKE.OdGsBaseModel_visualStyle__SWIG_0(this.swigCPtr);
			OdDbStub result = (intPtr == IntPtr.Zero) ? null : new OdDbStub(intPtr, false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual void setVisualStyle(OdGiVisualStyle visualStyle)
		{
			GlobalsPINVOKE.OdGsBaseModel_setVisualStyle__SWIG_1(this.swigCPtr, OdGiVisualStyle.getCPtr(visualStyle));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public new virtual bool visualStyle(OdGiVisualStyle visualStyle)
		{
			bool result = GlobalsPINVOKE.OdGsBaseModel_visualStyle__SWIG_1(this.swigCPtr, OdGiVisualStyle.getCPtr(visualStyle));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual bool makeStock(OdDbStub layoutId)
		{
			bool result = GlobalsPINVOKE.OdGsBaseModel_makeStock(this.swigCPtr, OdDbStub.getCPtr(layoutId));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual void releaseStock(OdDbStub layoutId)
		{
			GlobalsPINVOKE.OdGsBaseModel_releaseStock(this.swigCPtr, OdDbStub.getCPtr(layoutId));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public bool hasChangedLayers()
		{
			bool result = GlobalsPINVOKE.OdGsBaseModel_hasChangedLayers(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual void addModelReactor(OdGsModelReactor pReactor)
		{
			GlobalsPINVOKE.OdGsBaseModel_addModelReactor(this.swigCPtr, OdGsModelReactor.getCPtr(pReactor));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public new virtual void removeModelReactor(OdGsModelReactor pReactor)
		{
			GlobalsPINVOKE.OdGsBaseModel_removeModelReactor(this.swigCPtr, OdGsModelReactor.getCPtr(pReactor));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public new virtual void setEnableSectioning(bool bEnable)
		{
			GlobalsPINVOKE.OdGsBaseModel_setEnableSectioning(this.swigCPtr, bEnable);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public new virtual bool isSectioningEnabled()
		{
			bool result = GlobalsPINVOKE.OdGsBaseModel_isSectioningEnabled(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual bool setSectioning(OdGePoint3dArray points, OdGeVector3d upVector)
		{
			bool result = GlobalsPINVOKE.OdGsBaseModel_setSectioning__SWIG_0(this.swigCPtr, OdGePoint3dArray.getCPtr(points), OdGeVector3d.getCPtr(upVector));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual bool setSectioning(OdGePoint3dArray points, OdGeVector3d upVector, double dTop, double dBottom)
		{
			bool result = GlobalsPINVOKE.OdGsBaseModel_setSectioning__SWIG_1(this.swigCPtr, OdGePoint3dArray.getCPtr(points), OdGeVector3d.getCPtr(upVector), dTop, dBottom);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual void setSectioningVisualStyle(OdDbStub visualStyleId)
		{
			GlobalsPINVOKE.OdGsBaseModel_setSectioningVisualStyle(this.swigCPtr, OdDbStub.getCPtr(visualStyleId));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGsBaseModel.SectioningSettings getSectioning()
		{
			OdGsBaseModel.SectioningSettings result = new OdGsBaseModel.SectioningSettings(GlobalsPINVOKE.OdGsBaseModel_getSectioning(this.swigCPtr), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual bool saveModelState(SWIGTYPE_p_OdGsFiler pFiler, OdGsBaseVectorizer pVectorizer)
		{
			bool result = GlobalsPINVOKE.OdGsBaseModel_saveModelState__SWIG_0(this.swigCPtr, SWIGTYPE_p_OdGsFiler.getCPtr(pFiler), OdGsBaseVectorizer.getCPtr(pVectorizer));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual bool saveModelState(SWIGTYPE_p_OdGsFiler pFiler)
		{
			bool result = GlobalsPINVOKE.OdGsBaseModel_saveModelState__SWIG_1(this.swigCPtr, SWIGTYPE_p_OdGsFiler.getCPtr(pFiler));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual bool loadModelState(SWIGTYPE_p_OdGsFiler pFiler, OdGsBaseVectorizer pVectorizer)
		{
			bool result = GlobalsPINVOKE.OdGsBaseModel_loadModelState__SWIG_0(this.swigCPtr, SWIGTYPE_p_OdGsFiler.getCPtr(pFiler), OdGsBaseVectorizer.getCPtr(pVectorizer));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual bool loadModelState(SWIGTYPE_p_OdGsFiler pFiler)
		{
			bool result = GlobalsPINVOKE.OdGsBaseModel_loadModelState__SWIG_1(this.swigCPtr, SWIGTYPE_p_OdGsFiler.getCPtr(pFiler));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual bool saveClientModelState(SWIGTYPE_p_OdGsFiler pFiler)
		{
			bool result = GlobalsPINVOKE.OdGsBaseModel_saveClientModelState(this.swigCPtr, SWIGTYPE_p_OdGsFiler.getCPtr(pFiler));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual bool loadClientModelState(SWIGTYPE_p_OdGsFiler pFiler)
		{
			bool result = GlobalsPINVOKE.OdGsBaseModel_loadClientModelState(this.swigCPtr, SWIGTYPE_p_OdGsFiler.getCPtr(pFiler));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool postprocessModelLoading(SWIGTYPE_p_OdGsFiler pFiler)
		{
			bool result = GlobalsPINVOKE.OdGsBaseModel_postprocessModelLoading(this.swigCPtr, SWIGTYPE_p_OdGsFiler.getCPtr(pFiler));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		private object locker = new object();

		private HandleRef swigCPtr;

		public class SectioningSettings : IDisposable
		{
			[EditorBrowsable(EditorBrowsableState.Never)]
			public SectioningSettings(IntPtr cPtr, bool cMemoryOwn)
			{
				this.swigCMemOwn = cMemoryOwn;
				this.swigCPtr = new HandleRef(this, cPtr);
			}

			[EditorBrowsable(EditorBrowsableState.Never)]
			public static HandleRef getCPtr(OdGsBaseModel.SectioningSettings obj)
			{
				if (obj != null)
				{
					return obj.swigCPtr;
				}
				return new HandleRef(null, IntPtr.Zero);
			}

			~SectioningSettings()
			{
				this.Dispose();
			}

			public virtual void Dispose()
			{
				if (this.swigCPtr.Handle != IntPtr.Zero)
				{
					if (this.swigCMemOwn)
					{
						lock (this.locker)
						{
							if (this.swigCPtr.Handle != IntPtr.Zero && this.swigCMemOwn)
							{
								this.swigCMemOwn = false;
								GlobalsPINVOKE.delete_OdGsBaseModel_SectioningSettings(this.swigCPtr);
							}
						}
						this.swigCMemOwn = false;
					}
					this.swigCPtr = new HandleRef(null, IntPtr.Zero);
				}
				GC.SuppressFinalize(this);
			}

			public bool m_bEnabled
			{
				get
				{
					bool result = GlobalsPINVOKE.OdGsBaseModel_SectioningSettings_m_bEnabled_get(this.swigCPtr);
					if (GlobalsPINVOKE.SWIGPendingException.Pending)
					{
						throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
					}
					return result;
				}
				set
				{
					GlobalsPINVOKE.OdGsBaseModel_SectioningSettings_m_bEnabled_set(this.swigCPtr, value);
					if (GlobalsPINVOKE.SWIGPendingException.Pending)
					{
						throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
					}
				}
			}

			public bool m_bTopSet
			{
				get
				{
					bool result = GlobalsPINVOKE.OdGsBaseModel_SectioningSettings_m_bTopSet_get(this.swigCPtr);
					if (GlobalsPINVOKE.SWIGPendingException.Pending)
					{
						throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
					}
					return result;
				}
				set
				{
					GlobalsPINVOKE.OdGsBaseModel_SectioningSettings_m_bTopSet_set(this.swigCPtr, value);
					if (GlobalsPINVOKE.SWIGPendingException.Pending)
					{
						throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
					}
				}
			}

			public bool m_bBottomSet
			{
				get
				{
					bool result = GlobalsPINVOKE.OdGsBaseModel_SectioningSettings_m_bBottomSet_get(this.swigCPtr);
					if (GlobalsPINVOKE.SWIGPendingException.Pending)
					{
						throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
					}
					return result;
				}
				set
				{
					GlobalsPINVOKE.OdGsBaseModel_SectioningSettings_m_bBottomSet_set(this.swigCPtr, value);
					if (GlobalsPINVOKE.SWIGPendingException.Pending)
					{
						throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
					}
				}
			}

			public bool m_bVisualStyle
			{
				get
				{
					bool result = GlobalsPINVOKE.OdGsBaseModel_SectioningSettings_m_bVisualStyle_get(this.swigCPtr);
					if (GlobalsPINVOKE.SWIGPendingException.Pending)
					{
						throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
					}
					return result;
				}
				set
				{
					GlobalsPINVOKE.OdGsBaseModel_SectioningSettings_m_bVisualStyle_set(this.swigCPtr, value);
					if (GlobalsPINVOKE.SWIGPendingException.Pending)
					{
						throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
					}
				}
			}

			public OdGePoint3dArray m_points
			{
				get
				{
					IntPtr intPtr = GlobalsPINVOKE.OdGsBaseModel_SectioningSettings_m_points_get(this.swigCPtr);
					OdGePoint3dArray result = (intPtr == IntPtr.Zero) ? null : new OdGePoint3dArray(intPtr, false);
					if (GlobalsPINVOKE.SWIGPendingException.Pending)
					{
						throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
					}
					return result;
				}
				set
				{
					GlobalsPINVOKE.OdGsBaseModel_SectioningSettings_m_points_set(this.swigCPtr, OdGePoint3dArray.getCPtr(value));
					if (GlobalsPINVOKE.SWIGPendingException.Pending)
					{
						throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
					}
				}
			}

			public OdGeVector3d m_upVector
			{
				get
				{
					IntPtr intPtr = GlobalsPINVOKE.OdGsBaseModel_SectioningSettings_m_upVector_get(this.swigCPtr);
					OdGeVector3d result = (intPtr == IntPtr.Zero) ? null : new OdGeVector3d(intPtr, false);
					if (GlobalsPINVOKE.SWIGPendingException.Pending)
					{
						throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
					}
					return result;
				}
				set
				{
					GlobalsPINVOKE.OdGsBaseModel_SectioningSettings_m_upVector_set(this.swigCPtr, OdGeVector3d.getCPtr(value));
					if (GlobalsPINVOKE.SWIGPendingException.Pending)
					{
						throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
					}
				}
			}

			public double m_dTop
			{
				get
				{
					double result = GlobalsPINVOKE.OdGsBaseModel_SectioningSettings_m_dTop_get(this.swigCPtr);
					if (GlobalsPINVOKE.SWIGPendingException.Pending)
					{
						throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
					}
					return result;
				}
				set
				{
					GlobalsPINVOKE.OdGsBaseModel_SectioningSettings_m_dTop_set(this.swigCPtr, value);
					if (GlobalsPINVOKE.SWIGPendingException.Pending)
					{
						throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
					}
				}
			}

			public double m_dBottom
			{
				get
				{
					double result = GlobalsPINVOKE.OdGsBaseModel_SectioningSettings_m_dBottom_get(this.swigCPtr);
					if (GlobalsPINVOKE.SWIGPendingException.Pending)
					{
						throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
					}
					return result;
				}
				set
				{
					GlobalsPINVOKE.OdGsBaseModel_SectioningSettings_m_dBottom_set(this.swigCPtr, value);
					if (GlobalsPINVOKE.SWIGPendingException.Pending)
					{
						throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
					}
				}
			}

			public OdDbStub m_visualStyle
			{
				get
				{
					IntPtr intPtr = GlobalsPINVOKE.OdGsBaseModel_SectioningSettings_m_visualStyle_get(this.swigCPtr);
					OdDbStub result = (intPtr == IntPtr.Zero) ? null : new OdDbStub(intPtr, false);
					if (GlobalsPINVOKE.SWIGPendingException.Pending)
					{
						throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
					}
					return result;
				}
				set
				{
					GlobalsPINVOKE.OdGsBaseModel_SectioningSettings_m_visualStyle_set(this.swigCPtr, OdDbStub.getCPtr(value));
					if (GlobalsPINVOKE.SWIGPendingException.Pending)
					{
						throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
					}
				}
			}

			public SectioningSettings() : this(GlobalsPINVOKE.new_OdGsBaseModel_SectioningSettings(), true)
			{
				if (GlobalsPINVOKE.SWIGPendingException.Pending)
				{
					throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
				}
			}

			public bool isEnabled()
			{
				bool result = GlobalsPINVOKE.OdGsBaseModel_SectioningSettings_isEnabled(this.swigCPtr);
				if (GlobalsPINVOKE.SWIGPendingException.Pending)
				{
					throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
				}
				return result;
			}

			private object locker = new object();

			private HandleRef swigCPtr;

			protected bool swigCMemOwn;
		}
	}
}
